from datetime import datetime
from distutils.util import strtobool


#文件操作
#打开一个文件
# f = open('D:/ps/test.txt','w')
# f.write("hello word")
# f.close()
# print(f)

# file = []
# count = 0
# while True:
#     f = open('D:/ps/test.txt','r')
#     file.append(f)
#     f.close()
#     count += 1
#     print(f'文件打开次数：{count}')

# f = open('D:/ps/test.txt','r',encoding='utf8')
# # ret = f.read(2)
# # print(ret)
# # ret = f.readline()
# # for ret in f:
# #     print(ret,end='')
# #以列表的形式打印
# ret = f.readlines()
# print(ret,end='')
# f.close()

# dat1 = input('请输入开始时间：')
# dat2 = input('请输入结束时间：')
# data1 = datetime(2017,9,26)
# data2 = datetime.now()
# print(data2-data1)
# print(data2)

#日期计算器
# x1 = int(input('请输入年：'))
# y1 = int(input('请输入月：'))
# if y1>12:
#     y1 = y1 % 12
# z1 = int(input('请输入日：'))
# x2 = int(input('请输入年：'))
# y2 = int(input('请输入月：'))
# if y2>12:
#     y2 = y2 % 12
# z2 = int(input('请输入日：'))
#
# data1 = datetime(x1,y1,z1)
# data2 = datetime(x2,y2,z2)
#
# print(data2 - data1)


# #翻转字符串
# def strRevers(s:str):
#     str1 = s.split(' ')
#     str1.reverse()
#     return ' '.join(str1)
#
# ret = strRevers('I am student.')
# print(ret)

#旋转字符串
def rotate(s,goal):
    if len(s)!=len(goal):
        return False
    return goal in (s+s)

print(rotate('abcde','eabcd'))
print(rotate('ssdfdf','fadfa'))